﻿using System;
using Foundation;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using static UIKit.UINavigationBar;
using Corcav.Behaviors;
using ImageCircle.Forms.Plugin.iOS;

namespace Moven.iOS
{
	// The UIApplicationDelegate for the application. This class is responsible for launching the
	// User Interface of the application, as well as listening (and optionally responding) to
	// application events from iOS.
	[Register(nameof(AppDelegate))]
	public class AppDelegate : FormsApplicationDelegate
	{
		//
		// This method is invoked when the application has loaded and is ready to run. In this
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		//
		// You have 17 seconds to return from this method, or iOS will terminate your application.
		//
		public override bool FinishedLaunching(UIApplication app, NSDictionary options)
		{
            Appearance.BarTintColor = UIColor.FromRGB(43, 132, 211); //bar background
            Appearance.TintColor = UIColor.White; //Tint color of button items
            Appearance.SetTitleTextAttributes(new UITextAttributes()
            {
                Font = UIFont.FromName("HelveticaNeue-Light", (nfloat)20f),
                TextColor = UIColor.White
            });
            Forms.Init();
			ImageCircleRenderer.Init();
			Infrastructure.Init();
            LoadApplication (new App ());

			return base.FinishedLaunching (app, options);
		}
	}
}
